#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
	int arr1[10] = {1,3,5,7,9,14,15,17,35,77 };
	int arr2[10] = { 2,5,7,8,33,44,55,57,67,99};
	int arr3[20] = { 0 };
	int i = 0;
	int j = 0;
	/*for (i = 0; i < 10; i++)
	{
		scanf("%d ", &arr1[i]);
	}
	for (j = 0; j < 10; j++)
	{
		scanf("%d ", &arr2[j]);
	}*/
	i = 0;

	j = 0;
	int r = 0;
	while (i < 10 && j < 10)
	{
		if (arr1[i] < arr2[j])
		{
			arr3[r++] = arr1[i];
			i++;

		}
		else
		{
			arr3[r++] = arr2[j];
			j++;
		}

	}
	if (j < 10)
	{
		for (; j < 10; j++)
		{
			arr3[r++] = arr2[j];
		}
	}
	if (i < 10)
	{
		for (; i < 10; i++)
		{
			arr3[r++] = arr1[i];
		}
	}

	

	for (i = 0; i < 20; i++)
	{
		printf("%d ", arr3[i]);
	}
	return 0;
}